home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / September 96 / Saving weak refs. to other part < prev    next >
Encoding:
Internet Message Format  |  1996-09-19  |  2.2 KB  |  [TEXT/ttxt]

  1. Subject:     Saving weak refs. to other parts
  2. Sent:        9/18/96 4:16 AM
  3. Received:    9/18/96 4:16 AM
  4. From:        Erlend Stav <Erlend.Stav@informatics.sintef.no>
  5. Reply-To:    ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List
  7.  
  8.  
  9. We are making a suite of parts that can be connected to each other in
  10. various ways by the users. The connections is used in a "run-time" mode of
  11. the document to send messages between the parts (using extensions).
  12.  
  13. I have been trying to figure out how to make this connetions persistent (the
  14. users do not want to reconnect all the parts each time the document is
  15. opened). I have found a solution that will save the references (using the
  16. weak reference to the other parts storage unit) that work when I do a normal
  17. save of the document.
  18.  
  19. My problems start when I want this to function also during various cloning
  20. operations (i.e. "Save a copy"). I am using ODF for this work, but I think
  21. this is partly an ODF and partly an OD problem.
  22.  
  23. 1. ODFs handling of CloneInto for non-embedding parts simply externalizes
  24. the content, and though there are parameters for cloning info it does not
  25. use them. Of course, I can override FW_Parts CloneInto and make a sollution
  26. like for embedding parts. But is there any specific reason why the default
  27. FW_Part behavior is different from the embedding parts?
  28.  
  29. 2. This one is my -real- problem. During a cloning operation, I suppose that
  30. the right thing to do with my connected parts, is to use WeakClone. The
  31. documentation tells me that WeakClone will return an ID that I can use to
  32. get a weak reference -after- the cloning operation is finished; that is
  33. after EndClone if I understand it right. If my part started the cloning
  34. operation, this would be OK. But what happens in case of "Save as..." or if
  35. there is clipboard operation that invloves my part, but that was made from a
  36. part my part is embedded in? Possibly I have overlooked some detail here,
  37. but what I seem to miss is some sort of "PostClone" operation that lets my
  38. part check if the ID from WeakClone is valid after the cloning, and saves
  39. either the weak reference or a "NULL-tag" of some sort together with my
  40. "normal" content data.
  41.  
  42. So, does anyone have an idea on how this could be done?
  43.  
  44. - Erlend